package modifier.character;

import character.MyCharacter;

public class CharacterModifierActionSpeed extends CharacterModifier {
    protected float actionSpeedMultipler;
    
    @Deprecated
    protected CharacterModifierActionSpeed() {}
    
    public CharacterModifierActionSpeed(MyCharacter owner, float actionSpeedMultipler, int duration) {
        super(owner, duration);
        this.actionSpeedMultipler = actionSpeedMultipler;
    }

    public float getActionSpeedMultiplier() {
        return actionSpeedMultipler;
    }

    public void setActionSpeedMultiplier(float actionSpeedMultipler) {
        this.actionSpeedMultipler = actionSpeedMultipler;
    }

    @Override
    protected void apply() {
        System.out.println(affectedCharacter+" sped up!");
    }

    @Override
    protected void tick() {}

    @Override
    protected void completeNaturally() {
        System.out.println(affectedCharacter+" slowed back down.");
    }

    @Override
    protected void abort() {
        System.out.println(affectedCharacter+" slowed back down.");
    }
    
    @Override
    public CharacterModifier cloneForCharacter(MyCharacter character) {
        CharacterModifierActionSpeed clone = new CharacterModifierActionSpeed(owner, actionSpeedMultipler, totalTicks);
        cloneMeForCharacter(clone, character);
        return clone;
    }
}
